package com.app.backend.base.controller;

import com.app.backend.common.exception.AppException;
import com.app.backend.common.response.BaseResponse;
import com.fasterxml.jackson.databind.ser.Serializers;
import io.swagger.annotations.Api;
import org.hibernate.annotations.GeneratorType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ZhengJunJie
 * @Date: 2020/5/21 18:30
 */
@RestController
@Api(value = "监控接口")
@RequestMapping(value = "/api/monitor")
public class MonitorController {

    @GetMapping("/check-success")
    public String checkSuccess() {
        return "SUCCESS";
    }

    @GetMapping("success")
    public BaseResponse testSuccess() {
        return BaseResponse.success();
    }

    @GetMapping("exception")
    public BaseResponse testException() {
        throw new AppException("test exception");
    }
    

}
